package cn.lunatic.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;

/**
 * 
 * @Description:保存解释sql静态文本生成的执行sql对象
 * @author ganfeng
 * @date 2014-3-7 下午02:48:43
 */
public class SqlStatement implements Serializable{

	private static final long serialVersionUID = -2772283395099739289L;

	private String sqlId; // 需要执行的sqlId

	private String sql; // 需要执行的sql语句，兼容为调用存储过程的过程名

	private List<String> params; // 需要执行sql语句的参数，兼容为调用存储过程的输入参数

	private List<String> outParams; // 存储过程输出参数

	private List<String> outParamsName; // 存储过程输出参数名表达式，用户回填上下文使用

	public SqlStatement() {
		sql = new String();
		params = new ArrayList<String>();
		outParams = new ArrayList<String>();
		outParamsName = new ArrayList<String>();
	}

	public void addParam(String param) {
		params.add(param);
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public List<String> getParams() {
		return params;
	}

	public void setParams(List<String> params) {
		this.params = params;
	}

	public void addOutParam(String param) {
		outParams.add(param);
	}

	public List<String> getOutParams() {
		return outParams;
	}

	public void setOutParams(List<String> outParams) {
		this.outParams = outParams;
	}

	public void addOutParamName(String s) {
		outParamsName.add(s);
	}

	public List<String> getOutParamsName() {
		return outParamsName;
	}

	public void setOutParamsName(Vector<String> outParamsName) {
		this.outParamsName = outParamsName;
	}

	public String getSqlId() {
		return sqlId;
	}

	public void setSqlId(String sqlId) {
		this.sqlId = sqlId;
	}

}
